package github.flandre.examplemod.core.init.event;


import github.flandre.examplemod.examplemod;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE,modid = examplemod.MODID)
public class PlaceBlockEvent {
    @SubscribeEvent
    public static void onEntityPlaceEvent(BlockEvent.EntityPlaceEvent event)
    {
        Entity entity = event.getEntity();
        if(entity instanceof PlayerEntity)
        {
            System.out.println(event.getPlacedBlock().getBlock() + "." +  event.getPlacedAgainst().getBlock());
        }
    }
}
